<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title></title> <#include "/jeecms_sys/head.html"/>
		<script type="text/javascript">
$(function() {
	$("#jvForm").validate();
});
function checkValue(){
	var flag=true;
	if($("#dicName").val()!=""){
		$.post("v_check_value2.do",
				{
					dicName:$("#dicName").val(),
					typeCode:$("#typeCode").val()
				},
				function(data) {
					if(data.pass=="false"){
						$("#msgSpan").html("");
					}else{
						$("#msgSpan").html("<@s.m 'cmsDictionary.value.repeat'/>");
						}
				}, "json");
	}else{
		flag=false;
		$("#msgSpan").html("");
	}
	if($("#msgSpan").html()!=""){
		flag=false;
	}
	return flag;
}
</script>
	</head>
	<body>
		<div class="box-positon">
			<div class="rpos">
				<@s.m "global.position"/>: <@s.m "cmsDictionary.function"/> - <@s.m "global.edit"/>
			</div>
			<form class="ropt">
				<input type="submit" value=" <@s.m "global.backToList"/>"
					onclick="this.form.action='v_list2.do';" class="return-button"/> </form>
			<div class="clear"></div>
		</div>
		<div class="body-box">
			<@p.form id="jvForm" action="o_update2.do" onsubmit="return checkValue()"> 
			
			<@p.text label="父级编码" name="parentId" value=Dictionary.parentId required="true" class="required" maxlength="20"/>
			<@p.text label="类型编码" name="typeCode" id="typeCode" value=Dictionary.typeCode required="true" class="required" maxlength="20"/>
			<@p.text label="类型名称" name="typeName" value=Dictionary.typeName required="true" class="required" maxlength="20"/>
			<@p.text label="字典编码" name="dicCode" id="dicCode" value=Dictionary.dicCode required="true" class="required" maxlength="20"/>
			<@p.td colspan="2" label="字典名称">
			<@p.text name="dicName" value=Dictionary.dicName id="dicName" required="true" class="required" maxlength="20" onchange="checkValue()"/>
			<span style="color: red;" id="msgSpan"></span> </@p.td><@p.tr/>
			<@p.td><@p.hidden name="id" value=Dictionary.id/>
			<@p.submit code="global.submit"/> &nbsp; <@p.reset code="global.reset"/></@p.td>
			</@p.form>
		</div>
	</body>
</html>